//
//  QCGifHeader.m
//  QCFinance
//
//  Created by liuxiao on 17/3/10.
//  Copyright © 2017年 qingcheng. All rights reserved.
//

#import "QCGifHeader.h"
@interface QCGifHeader()
@property (weak, nonatomic) UILabel *label;             //下拉放开后刷新...
@property (weak, nonatomic) UIImageView *logo;          //吃对了 就瘦了 图片
@property (weak, nonatomic) UIActivityIndicatorView *loading; //转圈圈
@end

@implementation QCGifHeader

#pragma mark - 重写方法
#pragma mark 基本设置
- (void)prepare
{
    [super prepare];

    // 设置控件的高度
    self.mj_h = 64;

    // 隐藏时间
    self.lastUpdatedTimeLabel.hidden = YES;
    // 隐藏状态
    self.stateLabel.hidden = YES;

    // 设置普通状态的动画图片
    NSArray *idleImages = [[NSArray alloc] initWithObjects:
                           [UIImage imageNamed:@"load_1.png"],
                           [UIImage imageNamed:@"load_1.png"],
                           [UIImage imageNamed:@"load_1.png"],
                           [UIImage imageNamed:@"load_1.png"], nil];
    [self setImages:idleImages duration:idleImages.count*0.3 forState:MJRefreshStateIdle];

    // 设置即将刷新状态的动画图片（一松开就会刷新的状态）
    NSArray *pullingImages = [[NSArray alloc] initWithObjects:
                              [UIImage imageNamed:@"load_1.png"],
                              [UIImage imageNamed:@"load_2.png"],
                              [UIImage imageNamed:@"load_3.png"],
                              [UIImage imageNamed:@"load_4.png"], nil];
    [self setImages:pullingImages duration:pullingImages.count*0.3 forState:MJRefreshStatePulling];

    // 设置正在刷新状态的动画图片
    NSArray *refreshingImages = [[NSArray alloc] initWithObjects:
                                 [UIImage imageNamed:@"load_1.png"],
                                 [UIImage imageNamed:@"load_2.png"],
                                 [UIImage imageNamed:@"load_3.png"],
                                 [UIImage imageNamed:@"load_4.png"], nil];
    [self setImages:refreshingImages duration:refreshingImages.count*0.3 forState:MJRefreshStateRefreshing];
}



@end
